Snowball_233

Snowball_233

A student who is learning coding.

Do not pay too much attention to your server core and JDK distribution.

Recently, the most frequently asked question on the Creeper Forum server plugin section group (Group ID 332359582) is: What server core should I choose? Can I use Folia? Should I use Oracle or Zulu? Should I use Spark or Timing for performance analysis? These types of questions are actually irrelevant.

After seeing these questions, I realized a problem. As the cost of starting my own world server decreases, more and more newcomers want to try starting a server. They want to make their server popular across the internet, so they want to make it better. However, they are focusing on the wrong things. A true server owner should focus on the content, balance, community, and players of the server. So, I will explain to you why you shouldn't focus too much on other things.

Server Selection#

Currently, the Java server options on the market can be divided into the following categories:

TypeNameApplicable Range
Vanilla ServerVanillaOfficial Minecraft server, cannot load plugins or mods
Plugin ServerBukkit, Spigot, Paper, PurPur, Pufferfish, FoliaServer that can only load server plugins, cannot load mods
Mod ServerForge, Fabric, SpongeForgeServer that can only load mods, cannot load server plugins
Hybrid ServerCatServer, Mohist, Banner, ArclightServer that can load both server plugins and mods

Among them, the most controversial topic is whether I should use Folia. The question is obviously influenced by its reputation for multi-threading. However, let's reread the Folia official website description of its server:

Folia is designed to address the constant bottleneck of the Minecraft server running on a single thread causing performance issues. It is by no means a drop-in replacement for Paper.
---------
Folia 旨在解决 Minecraft 服务器在单个线程上运行导致性能瓶颈的问题。它绝不是 Paper 的替代品。

After carefully considering this statement, do you still think you really need Folia? "It is by no means a drop-in replacement for Paper." Clearly indicates that it is different from the Paper server in terms of gameplay experience, plugin compatibility, and stability. It also breaks many original features. Are you really willing to give up all of the above for the so-called ultimate performance?

Let's take a look at the recommended configuration from the Folia official website:

What hardware will Folia run best on?
Ideally, at least 16 cores (not threads).
---------
Folia 在什么硬件上运行得最好?
理想情况下,至少有16个内核(不是线程)。

So, does your server hardware configuration really meet the recommended requirements? How can you ensure that the performance is better than the traditional Paper server when it is below the recommended configuration?

JDK Distribution Selection#

JDK (Java Development Kit) is a suite provided for developers, which includes JRE (Java Runtime Environment). JVM (Java Virtual Machine) is part of JRE, and all Java programs run on JVM.

Currently, the most popular JDK distributions for Minecraft servers include: OpenJDK, Azul Zulu, GraalVM, Oracle JDK, etc.

Among them, I will take OpenJDK and Azul Zulu, the two most controversial distributions, as examples for testing. The test script is as follows:

Click to preview
#! /bin/bash

JVM_OPENJDK=openjdk-17.0.2
JVM_ZULU=zulu17.34.19-ca-jdk17.0.3-linux_x64

sudo rm -rf /home/server/jdks/test/logs*

for JVM_NAME in $JVM_OPENJDK $JVM_TEMURIN $JVM_SEMERU $JVM_ZULU $JVM_ZING; do

    echo '========================================'
    echo "Start testing $JVM_NAME"
    echo '========================================'

    sudo rm -rf /home/server/jdks/test/world

    mkdir logs
    sudo nice -n -20 /home/server/jdks/$JVM_NAME/bin/java \
              -Xmx6G -Xms6G -Xlog:gc:logs/gc.log -Xlog:gc* \
              -jar server.jar nogui | tee logs/full.log

    chmod 777 -R /home/server/jdks/test/logs
    mv -v /home/server/jdks/test/logs /home/server/jdks/test/logs-$JVM_NAME

    echo '========================================'
    echo "Finish testing $JVM_NAME"
    echo '========================================'

done

The test results are as follows:

JDKChunky TimeAverage Pause Time /msAverage GC Interval /s
OpenJDK9'01''50.68
Azul Zulu9'15''53.47

It is not difficult to see that the final test results of these two most controversial distributions are very similar. In actual use and experience, it is difficult to notice the difference.

Conclusion#

In conclusion, do not pay too much attention to server cores and JDK distributions. Instead, focus more on enriching and optimizing the game content. After all, what players really care about is the fun and experience of the game, not the technical solutions you choose. I hope you can invest more time in building the content of your server and provide more fun and memories for your players.

This article is synchronized and updated to xLog by Mix Space
The original link is https://blog.rescueme.life/posts/develop/donot-pay-too-much-attention-to-server-core-and-JDK


Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.